package movee.domain.dao;

import movee.domain.common.BaseBackupDevice;
import movee.domain.constants.BackupDeviceStatus;
import movee.domain.constants.BackupErrType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import movee.domain.constants.BackupTaskType;

import jakarta.validation.constraints.NotNull;

/**
 *
 *
 * @author movee
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@TableName("t_backup_device")
public class BackupDeviceDao extends BaseBackupDevice {

    @TableField(value = "file_size")
    private Long fileSize;

    @TableField(value = "status")
    @NotNull(message = "status字段不能为null")
    private BackupDeviceStatus status;

    @TableField(value = "task_type")
    @NotNull(message = "taskType字段不能为null")
    private BackupTaskType taskType;

    /**
     * 失败原因类型
     */
    @TableField(value = "err_type")
    @NotNull(message = "errType字段不能为null")
    private BackupErrType errType;
}
